package huanzhao.erp.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import huanzhao.erp.domain.types.PhoneReceiveType;
import huanzhao.erp.domain.types.PhoneState;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

@TableName(value = "phone")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Phone implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 进入系统的时间
     */
    @TableField(value = "create_time")
    private Date createTime;


    @TableField(value = "last_modified")
    private Date lastModified;

    /**
     * 品类
     */
    @TableField(value = "category")
    private String category;

    /**
     * 手机型号
     */
    @TableField(value = "model")
    private String model;

    /**
     * 品牌
     */
    @TableField(value = "brand")
    private String brand;

    /**
     * 手机imei号
     */
    @TableField(value = "imei")
    private String imei;

    /**
     * 手机的所属渠道id
     */
    @TableField(value = "team_id")
    private Long teamId;

    /**
     * 内存
     */
    @TableField(value = "memory")
    private String memory;

    /**
     * 颜色
     */
    @TableField(value = "color")
    private String color;

    /**
     * 机器的详情
     */
    @TableField(value = "detail")
    private String detail;

    /**
     * 手机的备注
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 到货类型
     */
    @TableField(value = "receive_type")
    private PhoneReceiveType receiveType;

    /**
     * 手机是否已丢失
     */
    @TableField(value = "lost")
    private Boolean lost;

    /**
     * 手机是否已损坏
     */
    @TableField(value = "damaged")
    private Boolean damaged;

    /**
     * 手机上一个状态
     */
    @TableField(value = "last_state")
    private PhoneState lastState;

    /**
     * 手机状态
     */
    @TableField(value = "state")
    private PhoneState state;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}